package com.masterrabbit.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.masterrabbit.mapper.OrderRecordsMapper;
import com.masterrabbit.domain.OrderRecords;
import com.masterrabbit.service.IOrderRecordsService;

/**
 * 订单记录Service业务层处理
 * 
 * @author laotu
 * @date 2025-03-19
 */
@Service
public class OrderRecordsServiceImpl implements IOrderRecordsService 
{
    @Autowired
    private OrderRecordsMapper orderRecordsMapper;

    /**
     * 查询订单记录
     * 
     * @param recordId 订单记录主键
     * @return 订单记录
     */
    @Override
    public OrderRecords selectOrderRecordsByRecordId(Long recordId)
    {
        return orderRecordsMapper.selectOrderRecordsByRecordId(recordId);
    }

    /**
     * 查询订单记录列表
     * 
     * @param orderRecords 订单记录
     * @return 订单记录
     */
    @Override
    public List<OrderRecords> selectOrderRecordsList(OrderRecords orderRecords)
    {
        return orderRecordsMapper.selectOrderRecordsList(orderRecords);
    }

    /**
     * 新增订单记录
     * 
     * @param orderRecords 订单记录
     * @return 结果
     */
    @Override
    public int insertOrderRecords(OrderRecords orderRecords)
    {
        return orderRecordsMapper.insertOrderRecords(orderRecords);
    }

    /**
     * 修改订单记录
     * 
     * @param orderRecords 订单记录
     * @return 结果
     */
    @Override
    public int updateOrderRecords(OrderRecords orderRecords)
    {
        return orderRecordsMapper.updateOrderRecords(orderRecords);
    }

    /**
     * 批量删除订单记录
     * 
     * @param recordIds 需要删除的订单记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderRecordsByRecordIds(Long[] recordIds)
    {
        return orderRecordsMapper.deleteOrderRecordsByRecordIds(recordIds);
    }

    /**
     * 删除订单记录信息
     * 
     * @param recordId 订单记录主键
     * @return 结果
     */
    @Override
    public int deleteOrderRecordsByRecordId(Long recordId)
    {
        return orderRecordsMapper.deleteOrderRecordsByRecordId(recordId);
    }
}
